<layout name="./Feedback/list_layout" />
<div class="page-header">

  <h2><span class="glyphicon glyphicon-list-alt glyphicon-head" aria-hidden="true"></span>留言管理</h2>
  
</div>

  <div class="table-responsive" ng-controller="FeedbackIndexCtrl">
	<!-- 在表格中标记collection -->
	<!-- 在table标签上注明循环变量line，默认为"line" -->
	<!-- table table-bordered table-striped table-hover table-condensed -->
	<table class="table table-striped table-hover" collection="feedback" line="feed" >
	  <thead>
		<tr>
		<td colspan="3" class="text-right">
			<include file="Public:feed-searchbar" />
		</td>	
		</tr>
		
	
		
		<tr>
		<th>留言信息</th>
		<th>留言内容</th>
		<th>回复内容</th>
		</tr>
	  </thead>
	  <tfoot>
		<td colspan="3">
			<div style="float:right;"><!-- 分页列表 -->		
			<include  file="Public:pagelist" />	
			</div>
		</td>
	  </tfoot>
	  <tbody>
		<!-- 为了兼容ng与浏览器，_id取名mgid -->
		<!-- 每行在tr标签上标记_id值 -->
		<tr ng-repeat="feed in data | filter: search" ng-show="feed.is_display=='1'" mgid="{{feed._id}}">
		  <td>
			<button class="btn btn-primary " disabled="disabled" type="button" ng-show="feed.is_reply">
			  已回复 <span class="badge">{{feed.is_reply}}</span>
			</button>
			<button class="btn btn-danger " disabled="disabled" type="button" ng-hide="feed.is_reply">
			  未回复 <span class="badge">{{feed.is_reply}}</span>
			</button>			
			<br />
			<span>姓名：{{feed.name}}</span><br />
			<span>电话：{{feed.tel}}</span><br />
			<span>邮箱：{{feed.mail}}</span><br />
			<span>IP：{{feed.ip}}</span><br />
			<span>{{feed.ip_area}}</span><br />
			<div>
			<button type="button" class="btn btn-danger btn-xs" switch-bool="is_display"><i class="fa fa-remove" aria-hidden="true"></i>删除</button>
			<button type="button" class="btn btn-primary btn-xs" ng-click="reply(feed)"><i class="fa fa-envelope-o" aria-hidden="true"></i>回复</button>
			</div>
			<div style="margin-top:10px;" ng-hide="feed.is_reply">
			</div>
		  </td>
		  <td><span load-by-id="content">{{feed.content}}</span></td>
		  <td><span load-by-id="reply">{{feed.reply}}</span></td>
		</tr>
	  </tbody>
	</table>
  </div>